<template>
  <div class="loading" @click="showLoadingClick">
    <div class="bg">
      <img src="@/assets/img/home/full-screen-loading.gif" alt="" />
    </div>
  </div>
</template>

<script setup>
import { useMainStore } from "@/stores/modules/main"
import { storeToRefs } from "pinia"
const mainStore = useMainStore()
const { showLoading } = storeToRefs(mainStore)
const showLoadingClick = () => {
  
  showLoading.value = false
}
</script>

<style lang="less" scoped>
.loading {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: center;

  .bg {
    width: 100px;
    height: 100px;
    background: url(@/assets/img/home/loading-bg.png) 0 0 / 100% 100%;
    display: flex;
    justify-content: center;
    align-items: center;

    img {
      width: 70px;
      height: 70px;
      margin-bottom: 10px;
    }
  }
}
</style>
